package com.qfedu.demo;

import com.qfedu.pojo.Account;
import com.qfedu.service.AccountService;
import org.apache.commons.dbutils.QueryRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;


public class Demo {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
      /*  AccountService accountService  = (AccountService) applicationContext.getBean("accountService");

        System.out.println(accountService);

        List<Account> allAccount = accountService.findAllAccount();
        for (Account account : allAccount) {
            System.out.println(account);
        }*/
        QueryRunner runner = applicationContext.getBean("runner", QueryRunner.class);
        System.out.println(runner);
    }
}
